class Category:
    def __init__(self, category_id, name, parent_category=None):
        self.category_id = category_id
        self.name = name
        self.parent_category = parent_category
        self.sub_categories = []

    def add_sub_category(self, sub_category):
        self.sub_categories.append(sub_category)

    def get_all_sub_categories(self):
        all_sub_cats = []
        for sub_cat in self.sub_categories:
            all_sub_cats.append(sub_cat)
            all_sub_cats.extend(sub_cat.get_all_sub_categories())
        return all_sub_cats